package com.orderVideo.enums;

public enum OrderQueryType {
    TODAY(1, "今日"),
    THIS_WEEK(2, "本周"),
    THIS_MONTH(3, "本月");

    private final int code;
    private final String description;

    OrderQueryType(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static OrderQueryType getByCode(int code) {
        for (OrderQueryType type : values()) {
            if (type.getCode() == code) {
                return type;
            }
        }
        return null;
    }
} 